package com.efounder.form.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

/**
 * Created by XinQing on 2016/10/27.
 */

public class JSUtils {
    /***
     * 获取表单编号
     * @param prefix
     * @return
     */
    public String getFormNO(String prefix) {
        String date = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss.SSS").format(new Date());//yyyy-MM-dd'T'HH:mm:ss.SSSZ
        Random random = new Random();
        String no = prefix + "-" + random.nextInt(999) + "-" + date;
        return no;
    }
}
